from typing import *
from math import inf


class Solution:
    def maxScore(self, grid: List[List[int]]) -> int:
        m, n = len(grid), len(grid[0])
        ans = -inf
        # f = [[inf] * n for _ in range(m)]
        for i in range(0, m):
            for j in range(0, n):
                u = grid[i - 1][j] if i > 0 else inf
                l = grid[i][j - 1] if j > 0 else inf
                ans = max(ans, grid[i][j] - u, grid[i][j] - l)
                grid[i][j] = min(u, l, grid[i][j])
        return ans

    print((1 << 14) * 14 * 14)


ans = []
ans.append(1)
ans.append(2)
ans.append(3)
print(ans)
ans.pop()
print(ans)
